﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;

namespace WaveMaster.Holidays.Club.Domain
{
    public class SeaPort
    {
        public long m_seaPortID;
        public string m_seaPortCode;
        public string m_seaPortName;
        public string m_country;
        public string m_remark;
        public bool m_active = false;
        public DateTime m_cretnDate;
        public DateTime m_modfctnDate;
        public long m_cretnBy;
        public long m_modfctnBy;


        public SeaPort() { }
        public SeaPort(long id) { m_seaPortID = id; }
        public SeaPort(long id, string name) { m_seaPortID = id; m_seaPortName = name; }
        public SeaPort(MySqlDataReader rd)
        {
            m_seaPortID = Convert.ToInt64(rd["m_seaPortID"]);
            m_seaPortCode = rd["m_seaPortCode"].ToString();
            m_seaPortName = rd["m_seaPortName"].ToString();
            m_country = rd["m_country"].ToString();
            m_remark = rd["m_remark"].ToString();
            m_active = Convert.ToBoolean(rd["m_active"].ToString());
            m_cretnDate = Convert.ToDateTime(rd["m_cretnDate"]);
            m_cretnBy = Convert.ToInt64(rd["m_cretnBy"]);
            m_modfctnDate = Convert.ToDateTime(rd["m_modfctnDate"]);
            m_modfctnBy = Convert.ToInt64(rd["m_modfctnBy"]);
        }
        public override string ToString()
        {
            return m_seaPortName;
        }

    }
}
